import request from '@/utils/request'

// 查询机场设置列表
export function listConfig(query) {
    return request({
        url: '/equipment/config/list',
        method: 'get',
        params: query
    })
}

// 查询机场设置详细
export function getConfig(id) {
    return request({
        url: '/equipment/config/' + id,
        method: 'get'
    })
}

// 新增机场设置
export function addConfig(data) {
    return request({
        url: '/equipment/config',
        method: 'post',
        data: data
    })
}

// 修改机场设置
export function updateConfig(data) {
    return request({
        url: '/equipment/config',
        method: 'put',
        data: data
    })
}

// 删除机场设置
export function delConfig(id) {
    return request({
        url: '/equipment/config/' + id,
        method: 'delete'
    })
}


// 根据机场id查询机场设置详细
export function getConfigByDockId(dockId) {
    return request({
        url: '/equipment/config/query/' + dockId,
        method: 'get'
    })
}

// 查询所有机场的id和名字
export function getAllDockName() {
    return request({
        url: '/equipment/config/allDockName',
        method: 'get'
    })
}
